FROM nginx:1.18.0
# 切换源1
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak \
    && echo "deb http://mirrors.ustc.edu.cn/debian/ buster main" >>/etc/apt/sources.list \
    && echo "deb-src http://mirrors.ustc.edu.cn/debian/ buster main" >>/etc/apt/sources.list \
    && echo "deb http://mirrors.ustc.edu.cn/debian-security buster/updates main" >>/etc/apt/sources.list \
    && echo "deb-src http://mirrors.ustc.edu.cn/debian-security buster/updates main" >>/etc/apt/sources.list \
    && echo "deb http://mirrors.ustc.edu.cn/debian/ buster-updates main" >>/etc/apt/sources.list \
    && echo "deb-src http://mirrors.ustc.edu.cn/debian/ buster-updates main" >>/etc/apt/sources.list
# 切换源2
#RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak \
#    && echo "deb http://mirrors.aliyun.com/debian/ buster main non-free contrib" >>/etc/apt/sources.list \
#    && echo "deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib" >>/etc/apt/sources.list \
#    && echo "deb http://mirrors.aliyun.com/debian-security buster/updates main" >>/etc/apt/sources.list \
#    && echo "deb-src http://mirrors.aliyun.com/debian-security buster/updates main" >>/etc/apt/sources.list \
#    && echo "deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib" >>/etc/apt/sources.list \
#    && echo "deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib" >>/etc/apt/sources.list \
#    && echo "deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib" >>/etc/apt/sources.list \
#    && echo "deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib" >>/etc/apt/sources.list
RUN apt-get update  && apt-get install -y \
    vim sudo less git zip unzip lrzsz net-tools wget iputils-ping

# 自定义服务
RUN echo "export LS_OPTIONS='--color=auto'" >>~/.bashrc
RUN echo "eval "`dircolors`"" >>~/.bashrc
RUN echo "alias ll='ls \$LS_OPTIONS -l'" >>~/.bashrc
RUN /bin/bash -c "source ~/.bashrc"
RUN ln -sfn /var/www /root/www \
    && ln -sfn /var/log /root/log